<section class="header-img clearfix">
    <img class="banner" src="<?php echo Yii::app()->request->baseUrl; ?>/img/banner.jpg">
    <div class="expert-view">
        <a href="#">
            <img class="img-responsive"  src="<?php echo Yii::app()->request->baseUrl; ?>/img/supportthecause.png">
        </a>
    </div>
    <div class="facebook-box">
        <a href="#">
            <img class="img-responsive"  src="<?php echo Yii::app()->request->baseUrl; ?>/img/facebook-head.png">
        </a>
    </div>
</section>

<section class="affdv">
    <div class="container">
        <div class="row">        

            <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
                <div class="gap"></div>
                <div class="content-area clearfix">
                    <h1 class="headings1"><?php echo $model->title ?></h1>
                    <div class="content-article">
                        <?php if (!empty($model->photo)) { ?><img src="<?php echo Yii::app()->request->baseUrl . aqConfig::getUploadDir() . 'article-image/' . $model->photo; ?>" alt="history" class="thumbnail pull-right"><?php } ?>
                        <?php
                        if (!empty($model)) {
                            echo html_entity_decode($model->description);
                        }
                        ?>        </div>
                    <div class="gap"></div>
                    <div class="gap"></div>
                </div>
            </div>
            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
                <div class="article-heads">
                    <div class="list-group article-links">
                        <?php
                        $criteria = new CDbCriteria(array(
                            'order' => 'RAND()',
                        ));

                        $results = Article::model()->findAll($criteria);
                        ?><?php
                        foreach ($results as $result) {
                            echo '<a href="' . $this->createUrl('/article/viewarticles/id/' . $result->id) . '" class="list-group-item">' . substr($result->title, 0, 40) . '</a>';
                        }
                        ?> 
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

